﻿#region Using Directives

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Collections;

using QuickDev.Model;
using QuickDev.Common.DB;

#endregion

namespace QuickDev.SQLServerDAL
{
    /// <summary>
    /// Data Access Layer For dbo.SYS_CurrencyCode.
    /// </summary>
    public class CurrencyCodeDAL
    {
        #region GetList

        /// <summary>
        /// public IList(CurrencyCode) GetList()
        /// </summary>
        /// <returns>IList(CurrencyCode)</returns>
        public static List<CurrencyCode> GetList()
        {
            string procedureName = "SYS_CurrencyCode_GetList";

            List<CurrencyCode> modelList = new List<CurrencyCode>();

            try
            {
                ReaderFactory.ReaderToList<CurrencyCode>( SqlDataCommon.ExecuteReader( CommandType.StoredProcedure, procedureName ), modelList );
                return modelList;
            }
            catch ( System.Exception ex )
            {
                throw new ApplicationException( "An error has occurred in accessing the database", ex );
            }
        }
        #endregion
    }
}
